package cn.hsw.component.data.base;

import cn.hsw.component.core.base.BaseConstant;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * 全局模型
 * @author 李子木
 * @date 2020-10-28
 */
@Getter
@Setter
public class BaseModel {

    @ApiModelProperty("主键")
    @TableId(type = IdType.ASSIGN_ID)
    private Long pid;

    @ApiModelProperty("创建时间")
    @TableField(value = "CREATE_TIME",fill = FieldFill.INSERT)
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty("最后一次修改时间")
    @TableField(value = "LAST_UPDATE_TIME",fill = FieldFill.INSERT_UPDATE)
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date lastUpdateTime;

    @ApiModelProperty("创建人")
    @TableField(value = "CREATE_BY",fill = FieldFill.INSERT)
    private Long createBy;

    @ApiModelProperty("修改人")
    @TableField(value = "UPDATE_BY",fill = FieldFill.INSERT_UPDATE)
    private Long updateBy;

    @ApiModelProperty("备注")
    @TableField("REMARK")
    private String remark;
}
